import React, { PureComponent } from 'react';
import {
  Drawer, Divider, Col, Row, Card, Form,
} from 'antd';
import TableForm from './TableForm';

@Form.create()
class MembersComponent extends PureComponent {
  constructor(props) {
    super(props);
  }

  render() {
    const { memberVisible, onClose, memberList } = this.props;
    const {
      form: { getFieldDecorator },
      submitting,
    } = this.props;
    return <Drawer
      width={640}
      placement="right"
      closable={true}
      onClose={() => onClose(false, [])}
      visible={memberVisible}
    >
      <Card title="成员管理" bordered={false}>
        {getFieldDecorator('members', {
          initialValue: memberList,
        })(<TableForm/>)}
      </Card>
    </Drawer>;
  }
}

export default MembersComponent;
